package topday1_9.mxdx9;

/**
 * @Auther:小陈的Java
 * 懒汉式单例设计模式
 */
public class Singleton1 {
    private Singleton1(){}

    private static Singleton1 single;

    public static Singleton1 getInstance(){
        if(single == null){
            single = new Singleton1();
        }
        return single;
    }
}
